using System.Collections;
using System.Collections.Generic;
using System.Xml.Linq;
using UnityEngine;
using UnityEngine.UI;

public class GamePanel : IUIBehavior
{
    public override void Init()
    {

    }

    public override void AddListener()
    {
        GetUIElement<Button>("btnBackHome").onClick.AddListener(OnBackHomeClick);
        GetUIElement<Button>("btnPause").onClick.AddListener(OnPauseClick);
    }

    public override void RemoveListener()
    {
        GetUIElement<Button>("btnBackHome").onClick.RemoveListener(OnBackHomeClick);
        GetUIElement<Button>("btnPause").onClick.RemoveListener(OnPauseClick);
    }

    public void OnBackHomeClick()
    {
        PanelManager.Instance.ShowPanel(typeof(HomePanel).Name);
    }

    public void OnPauseClick()
    {
        PanelManager.Instance.ShowDialog(typeof(PauseDialog).Name);
    }
}
